<template>
  <view class="popup-content">
    <view class="popup-box">{{title}}</view>
    <view class="popup-text"
      >{{ text }}</view
    >
    <view class="underline"></view>
    <view class="popup-bottom"
      ><enterpriceItem :title="enterpriceName" :list='list' :time="time" :imageUrl="imageUrl"></enterpriceItem>
    </view>
    <view class="comment-box">
      <goComment @click="onClick" :title="btnText"></goComment>
    </view>
  </view>
</template>

<script setup>
import { defineProps,defineEmits, onMounted } from 'vue';
import enterpriceItem from "./enterprice-item.vue"
import goComment from "./go-comment.vue"
const props = defineProps({
    title: {
        type:String,
    },
    text: {
        type:String,
    },
    btnText: {
        type:String,
    },
    enterpriceName: {
        type:String,
    },
	list:{
		type:Array,
		default:[]
	},
	time:{
        type:String,
    },
	imageUrl:{
		  type:String,
	},
	id:{
		 type:String,
	}
})
const emit = defineEmits(["on-click"])
function onClick () {
    emit("on-click",{name:props.enterpriceName,id:props.id})
}

onMounted(()=>{
	console.log(props,'接收传值');
})
</script>

<style lang="less" scoped>
.popup-content {
	border-radius: 20rpx 20rpx 0 0;
	overflow: hidden;
    .popup-box {
    width: 100vw;
    height: 100rpx;
    text-align: center;
    line-height: 100rpx;
    font-size: 31rpx;
    font-family: "ali-m";
  }
  .popup-text {
    font-size: 31rpx;
    color: #9b9b9b;
    font-family: "ali";
    padding: 20rpx;
  }
  .underline {
    width: 98vw;
    height: 1rpx;
    background-color: #dadada;
    margin: 0 0 0 20rpx;
  }
  .popup-bottom {
    height: 400rpx;
  }
  .comment-box {
    width: 100vw;
    height: 120rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 0;
    .go-comment {
      background-image: linear-gradient(to right, #ff934c, #fc686f);
      width: 90vw;
      height: 70rpx;
      border-radius: 20rpx;
      text-align: center;
      line-height: 70rpx;
      color: #ffffff;
      font-size: "ali-m";
      font-size: 32rpx;
    }
  }
}
</style>